@echo off
if not exist "..\shc\mpi\x64\Release\onemax_shc_mpi.exe" (echo ERROR: ..\shc\mpi\x64\Release\onemax_shc_mpi.exe not found
echo Please build project onemax_shc_mpi
goto :eof
)

for %%R in (1100101) do for %%G in (1 2) do (call :run %%R %%G)
goto :eof

:run
echo randseed: %1, cpu: %2
if not exist "..\res\shc_sample\%1" @mkdir "..\res\shc_sample\%1"
if exist "..\res\shc_sample\%1\%2.shc.mpi.txt" del "..\res\shc_sample\%1\%2.shc.mpi.txt"
"C:\Program Files\MPICH2\bin\mpiexec.exe" -localonly -pwdfile "..\..\..\logins\logins.txt" -machinefile "..\..\..\logins\hosts.txt" -np %2 "..\shc\mpi\x64\Release\onemax_shc_mpi.exe" %1 "shc_100.xml" > "..\res\shc_sample\%1\%2.shc.mpi.txt"